package com.example.xianji.activity;

import android.os.Bundle;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.RelativeLayout;

import com.example.xianji.Contant;
import com.example.xianji.R;

public class Main_VIP_GuangLiActivity extends Activity implements OnClickListener {
    /**
     * VIP管理
     */
    private RelativeLayout vip_relative_guanli_back, relativelayout_add_friend_lianjie, relativelayout_my_friend_lianjie;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
        setContentView(R.layout.activity_main__vip__guang_li);
        vip_relative_guanli_back = (RelativeLayout) findViewById(R.id.vip_relative_guanli_back);
        relativelayout_my_friend_lianjie = (RelativeLayout) findViewById(R.id.relativelayout_my_friend_lianjie);
        relativelayout_add_friend_lianjie = (RelativeLayout) findViewById(R.id.relativelayout_add_friend_lianjie);

        vip_relative_guanli_back.setOnClickListener(this);
        relativelayout_my_friend_lianjie.setOnClickListener(this);
        relativelayout_add_friend_lianjie.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.vip_relative_guanli_back) {
            Main_VIP_GuangLiActivity.this.finish();
        } else if (v.getId() == R.id.relativelayout_my_friend_lianjie) {
            //我的友链
            startActivity(new Intent(Main_VIP_GuangLiActivity.this, Main_My_Friend_LianJieActivity.class));
        } else if (v.getId() == R.id.relativelayout_add_friend_lianjie) {
            //添加友链
            Intent intent = new Intent(Main_VIP_GuangLiActivity.this, Main_Add_Friend_LianJieActivity.class);
            intent.putExtra("add_friend_lianjie", Contant.product_vip_lianjie_add);
            startActivity(intent);
        }
    }
}
